#ifndef CAMERA_H
#define CAMERA_H

#include <QWidget>
#include <QFile>
#include <QTextStream>
#include "wifiserial.h"
class DHT11;

extern bool panduan;
extern bool showflag;
namespace Ui
{
    class Camera;
}

class Camera : public QWidget
{
    Q_OBJECT

public:
    explicit Camera(QWidget *parent = 0);
    virtual void timerEvent(QTimerEvent *event);
    ~Camera();

private slots:
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void on_pushButton_3_clicked();
    void saveImageData(unsigned char *rgb, int x, int y);
    void saveAsBmp(const unsigned char *rgb, int width, int height, const QString &filename);
    void saveAsJpeg(const unsigned char *rgb, int width, int height, const QString &filename);
    void saveAsPng(const unsigned char *rgb, int width, int height, const QString &filename);

private:
    Ui::Camera *ui;

signals:
    void goback();
};

#endif // CAMERA_H
